home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / develop / ad2mac.arc / TEST11.LST < prev    next >
File List  |  1989-08-04  |  9KB  |  193 lines

  1.   Fri Aug  4 1989 10:17                                                                                                  Page    1
  2.  
  3.         HC11 Test Program for AD2MAC
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                2500 A.D. 68c11 Macro Assembler  -  Version 4.03a
  10.                -------------------------------------------------
  11.  
  12.                        Input  Filename : test11.asm
  13.                        Output Filename : test11.obj
  14.  
  15.  
  16.     1                                  ttl    HC11 Test Program for AD2MAC
  17.     2                              *  Test Program for AD2MAC Utility
  18.     3                              *  Extracts symbol info from 2500AD cross 68HC11 assembler
  19.     4                              *  listing file (.LST) and produces HDS-300 compatible
  20.     5                              *  macro file (.MAC) containing local symbol (LS) commands.
  21.     6                              *
  22.     7                              *  BY:  Peter S. Gilmour    27 July 1989
  23.     8                              
  24.     9          0103                control    equ    $103
  25.    10          0080                srmask    equ    $80
  26.    11          0204                fcbase    equ    $204
  27.    12          0040                stmask    equ    $40
  28.    13          00AA                pattern    equ    $aa
  29.    14          0200                shram    equ    $200
  30.    15          0307                jmp1    equ    $307
  31.    16          0323                jmp1_addr equ    jmp1+$1c
  32.    17                              
  33.    18   0000                           .absolute
  34.    19   0050                           org    $50
  35.    20   0050                       count    rmb    1        Command count
  36.    21   0051                           .relative
  37.    22   0200                           org    shram
  38.    23   0200                           rmb    $20
  39.    24   0220                       addr    rmb    2        Command address
  40.    25   0222                       get    rmb    2        Get data address
  41.    26   0224                       data    rmb    80        Command data
  42.    27   0274                           rmb    100
  43.    28          02D7                stack    equ    *-1        Stack area
  44.    29                                  page
  45.   Fri Aug  4 1989 10:17                                                                                                  Page    2
  46.  
  47.         HC11 Test Program for AD2MAC
  48.  
  49.  
  50.    30                              
  51.    31   0800                           org    $800
  52.    32                              
  53.    33                              * Here for power up/reset:
  54.    34   0800   B6 01 03            start    ldaa    control
  55.    35   0803   84 40                   anda    #stmask        If not power up, then
  56.    36   0805   27 1A                   beq    config        .  enter exec via config cmd!
  57.    37                              
  58.    38                              * Here for self-test:
  59.    39   0807   C6 00               stest    ldab    #0
  60.    40   0809   86 AA                   ldaa    #pattern
  61.    41   080B   CE 02 00                ldx    #shram
  62.    42   080E   A7 00               st_100    staa    ,x        Test 1st page of shared ram.
  63.    43   0810   A1 00                   cmpa    ,x
  64.    44   0812   26 08                   bne    st_err1        Exit if error!
  65.    45   0814   43                      coma            Get inverse pattern
  66.    46   0815   2A F7                   bpl    st_100        and test same location again!
  67.    47   0817   5C                      incb
  68.    48   0818   27 F4                   beq    st_100        Continue until entire page is tested!
  69.    49                              
  70.    50   081A   20 0C                   bra    exec        Enter executive loop.
  71.    51                              
  72.    52                              * Here for self-test error:
  73.    53   081C   CC 02 00            st_err1 ldd    #shram
  74.    54   081F   20 FE                   bra    *        Hang the system.
  75.    55                                  page
  76.   Fri Aug  4 1989 10:17                                                                                                  Page    3
  77.  
  78.         HC11 Test Program for AD2MAC
  79.  
  80.  
  81.    56                              
  82.    57                              * Here for config command:
  83.    58   0821   B6 01 03            config    ldaa    control
  84.    59   0824   B7 02 00                staa    shram
  85.    60   0827   01                      nop
  86.    61                              * Fall into the exec loop!
  87.    62                              
  88.    63                              * Here for the executive command loop:
  89.    64   0828   8E 02 D7            exec    lds    #stack        Reset stack pointer.
  90.    65   082B   B6 01 03                ldaa    control
  91.    66   082E   8A 80                   oraa    #srmask
  92.    67   0830   B7 01 03                staa    control        Yield shared ram to FIM.
  93.    68                              
  94.    69   0833   B6 01 03            ex$wait    ldaa    control
  95.    70   0836   84 80                   anda    #srmask
  96.    71   0838   26 F9                   bne    ex$wait        Wait for FIM to return shared ram.
  97.    72                              
  98.    73   083A   B6 02 04                ldaa    fcbase        Get cmd word and verify it, else
  99.    74   083D   26 E9                   bne    exec        .  ignore it!
  100.    75   083F   F6 02 05                ldab    fcbase+1
  101.    76   0842   81 02                   cmp    #maxfc+1
  102.    77   0844   24 E2                   bhs    exec
  103.    78                              
  104.    79   0846   58                      lslb            Get addr of proper routine from table
  105.    80   0847   CE 08 4F                ldx    #ftabl        and place into X register.
  106.    81   084A   3A                      abx    
  107.    82                              
  108.    83   084B   AD 00                   jsr    ,x        Go execute the command.
  109.    84   084D   20 D9                   bra    exec        Return to exec loop.
  110.    85                              
  111.    86   084F   0853                ftabl    fdb    rduser
  112.    87   0851   0862                    fdb    wruser
  113.    88          0001                maxfc    equ    ((*-ftabl)/2)-1        Maximum legal function code
  114.    89                                  page
  115.   Fri Aug  4 1989 10:17                                                                                                  Page    4
  116.  
  117.         HC11 Test Program for AD2MAC
  118.  
  119.  
  120.    90                              
  121.    91                              * Here for read user memory command:
  122.    92   0853   BD 08 71            rduser    jsr    cmd.init
  123.    93                              
  124.    94   0856   A6 00               rduser1 ldaa    0,x
  125.    95   0858   B7 02 24                staa    data
  126.    96   085B   08                      inx
  127.    97   085C   7C 00 50                inc    count
  128.    98   085F   26 F5                   bne    rduser1
  129.    99                              
  130.   100   0861   39                      rts
  131.   101                              
  132.   102                              * Here for write user memory command:
  133.   103   0862   BD 08 71            wruser    jsr    cmd.init
  134.   104                              
  135.   105   0865   B6 02 24            wruser1 ldaa    data
  136.   106   0868   A7 00                   staa    ,x
  137.   107   086A   08                      inx
  138.   108   086B   7C 00 50                inc    count
  139.   109   086E   26 F5                   bne    wruser1
  140.   110                              
  141.   111   0870   39                      rts
  142.   112                              
  143.   113                              * Subr. to init for command execution:
  144.   114   0871   B6 02 20            cmd.init ldaa    addr
  145.   115   0874   B7 02 22                staa    get
  146.   116   0877   B6 02 21                ldaa    addr+1
  147.   117   087A   B7 02 23                staa    get+1
  148.   118   087D   39                      rts
  149.   119                              
  150.   120   087E                           end
  151.   Fri Aug  4 1989 10:17                                                                                                  Page    5
  152.  
  153.  
  154. Defined            Symbol Name             Value                References
  155.  
  156.    24    addr                               0220          114    116
  157.   114    cmd.init                           0871           92    103
  158.   Pre    CODE                               0050           19     22     31
  159.    58    config                             0821           36
  160.     9    control                         =  0103           34     58     65     67     69
  161.    20    count                              0050           97    108
  162.   Pre    DATA                               0000      
  163.    26    data                               0224           95    105
  164.    69    ex$wait                            0833           71
  165.    64    exec                               0828           50     74     77     84
  166.    11    fcbase                          =  0204           73     75
  167.    86    ftabl                              084F           80     88
  168.    25    get                                0222          115    117
  169.    15    jmp1                            =  0307           16
  170.    16    jmp1_addr                       =  0323      
  171.    88    maxfc                           =  0001           76
  172.   Pre    PAGE0                              0000      
  173.    13    pattern                         =  00AA           40
  174.    92    rduser                             0853           86
  175.    94    rduser1                            0856           98
  176.    14    shram                           =  0200           22     41     53     59
  177.    10    srmask                          =  0080           66     70
  178.    28    stack                           =  02D7           64
  179.    34    start                              0800      
  180.    39    stest                              0807      
  181.    12    stmask                          =  0040           35
  182.    42    st_100                             080E           46     48
  183.    53    st_err1                            081C           44
  184.   103    wruser                             0862           87
  185.   105    wruser1                            0865          109
  186.  
  187.  
  188.  
  189.  
  190.            Lines Assembled :  120             Assembly Errors :  0
  191.  
  192.  
  193.